/*
 * Created on Dec 7, 2003
 */
package org.vectrics.user.web.struts;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.jsp.JspException;

import org.apache.log4j.Logger;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionMapping;
import org.vectrics.user.User;

/**
 * @author mmoore
 */
abstract public class AdminSaveUserAction extends SaveUserAction {
    private transient static Logger log = Logger.getLogger(AdminSaveUserAction.class);

    public AdminSaveUserAction() {
        super();
    }

    protected boolean getUserNameRequired() {
        return (false);
    }

    protected boolean getEmailRequired() {
        return (false);
    }

    protected boolean getSaveHomeAddress() {
        return (true);
    }

    protected boolean getSaveWorkAddress() {
        return (true);
    }

    protected boolean getSaveRoles() {
        return (true);
    }

    protected boolean getSavePassword() {
        return (true);
    }

    protected void saveExtendedData(User user, ActionMapping mapping, UserProfileForm profileForm,
            HttpServletRequest request, HttpServletResponse response, ActionErrors errors) throws JspException {
        // Derived class provides this behavior
        log.debug("doSave() - called");

    }

}
